<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">资讯列表</span><span class="crumb-step">&gt;</span><span class="crumb-name">资讯管理<span style="color: red"><span class="crumb-step">&gt;</span><span id="count">
    <c:if test="${requestScope.count gt '0'}">
        发布待审核：(${requestScope.count})
    </c:if>
        </span>
    <span id="finish">
          <c:if test="${requestScope.count gt '0'}">
              完成待审核：(${requestScope.finishCount})
          </c:if>
    </span>
    </span></span>
  <c:if test="${requestScope.count eq '0'}">
      (暂无提交)
  </c:if>
    </div>
</div>
<div class="search-wrap">
    <div class="result-title">
        <div class="result-list">
            <select>
                <c:forEach items="${requestScope.marks}" var="mark">
                    <option value="${mark.id}">${mark.title}</option>
                </c:forEach>
            </select>
        </div>
    </div>

<table class="result-tab" width="100%">
    <tr>
        <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox">排序</th>
        <th>任务名</th>
        <th>发布者</th>
        <th>发布时间</th>
        <th>接收者</th>
        <th>接收时间</th>
        <th>任务内容</th>
        <th>索引图片</th>
        <th>任务进度</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${requestScope.task.list}" var="task" varStatus="stat">
        <tr id="tr${task.id}">
            <td class="tc"><input name="id[]" value="59" type="checkbox">${stat.index+1}</td>
            <td data-id="${task.id}" class="new" style="color: #4b7eff">《${task.title}》</td>
            <td>${task.userinfo.username}</td>
            <td><fmt:formatDate value="${task.inputTime}" pattern="yyyy-MM-dd"/></td>

            <td>
             <c:if test="${empty task.vuserinfo.username}">
                 <span style="color: red">任务暂无人接收</span>
             </c:if>
             <c:if test="${not empty task.vuserinfo.username}">
                    <span style="color: green">已接收，接收人</span>(${task.vuserinfo.username})
             </c:if>
</td>
            <td><fmt:formatDate value="${task.acceptTime}" pattern="yyyy-MM-dd"/></td>
            <td>${fn:substring(task.info,0,10)}.....</td>
            <td><img id="pic" style="width: 120px" src="<%=path%>/web/userinfo/img/taskImages/${task.pic}"></td>
            <td>
                    ${task.mark.title}
            </td>
            <td>
                删除
            </td>
        </tr>
    </c:forEach>
</table>
<div class="list-page">
    <c:forEach  items="${requestScope.task.navigatepageNums}" var="i">
        <a class="list"  data-id="${i}">${i}</a>
    </c:forEach>
</div>

<jsp:include page="/manage/inc/footer"></jsp:include>
<script>
    $(function () {
        $("#pic").click(function () {
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                area: 'auto',
                skin: 'layui-layer-nobg', //没有背景色
                shadeClose: true,
                content: $('#pic')
            });
        })
    })

</script>